﻿using System;
using System.Data;
public partial class manager_eval_View : System.Web.UI.Page
{
    DBHelper db = new DBHelper();
    public int psid = 0;
    public int Year = 0;
    public int Month = 0;
    public string zx_psid = "";
    public string userbh = "";

    public string num_1 = "0";
    public string num_2 = "0";
    public string num_3 = "0";
    public string num_4 = "0";


    protected void Page_Load(object sender, EventArgs e)
    {
        psid = Convert.ToInt32(Request.QueryString["id"]);
        Year = Convert.ToInt32(Request.QueryString["Year"]);
        Month = Convert.ToInt32(Request.QueryString["Month"]);
        if (!IsPostBack)
        {
            bindData();
        }
    }
    private void bindData()
    { 

        DataTable dt = db.getList("select * from v_A_Task where RY_zxr='" + psid + "'  and year='" + Year + "' and month='" + Month + "' order by id desc");
        rpt_Listask_zx.DataSource = dt;
        rpt_Listask_zx.DataBind();
        num_1 = dt.Rows.Count.ToString();

        dt = db.getList("select * from v_A_Task where RY_zrr='" + psid + "'  and year='" + Year + "' and month='" + Month + "' and id not in ( select id from v_A_Task where RY_zxr='" + psid + "'  and year='" + Year + "' and month='" + Month + "') order by id desc");
        rpt_Listask_zr.DataSource = dt;
        rpt_Listask_zr.DataBind();
        num_2 = dt.Rows.Count.ToString();

        dt = db.getList("select * from v_A_Task where RY_bkhr='" + psid + "'  and year='" + Year + "' and month='" + Month + "' and id not in ( select id from v_A_Task where (RY_zxr='" + psid + "' or RY_zrr='" + psid + "')   and year='" + Year + "' and month='" + Month + "') order by id desc");
        rpt_Listask_bkh.DataSource = dt;
        rpt_Listask_bkh.DataBind();
        num_3 = dt.Rows.Count.ToString();

        dt = db.getList("select * from v_A_Task where RY_bkhr='" + psid + "'  and year='" + Year + "' and month='" + Month + "' and id not in ( select id from v_A_Task where (RY_zxr='" + psid + "' or RY_zrr='" + psid + "')   and year='" + Year + "' and month='" + Month + "') order by id desc");
        rpt_Listask_bkh.DataSource = dt;
        rpt_Listask_bkh.DataBind();
        num_4 = dt.Rows.Count.ToString();

    }
}